-- ----------------------------- 2023-07-03 add by zhoujq--------------begin

-- 建表语句
CREATE TABLE T_LIMS_RUN_OUTSEND( 
    ID NUMBER NOT NULL,
    RUNID NUMBER NULL,
    OUTSOURCERNAME VARCHAR2(200)  NULL,
    OUTSOURCERID NUMBER NULL,
    COURIER VARCHAR2(100)  NULL,
    COURIERNUMBER VARCHAR2(50)  NULL,
    SENDTIME DATE NULL,
    REMARK VARCHAR2(200)  NULL,
    CREATEDBYID VARCHAR2(36)  NULL,
    CREATEDBYNAME VARCHAR2(60)  NULL,
    CREATEDTIME DATE NULL,
    CREATEDBYORGID VARCHAR2(36)  NULL,
    CREATEDBYORGNAME VARCHAR2(270)  NULL
 );
COMMENT ON TABLE T_LIMS_RUN_OUTSEND IS '任务批次-外送信息表';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.ID IS '主键';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.RUNID IS '批次ID';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.OUTSOURCERNAME IS '外包商名称';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.OUTSOURCERID IS '外包商id';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.COURIER IS '快递公司';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.COURIERNUMBER IS '快递单号';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.SENDTIME IS '外送时间';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.REMARK IS '备注';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.CREATEDBYID IS '制单人编码';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.CREATEDBYNAME IS '制单人名称';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.CREATEDTIME IS '制单时间';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.CREATEDBYORGID IS '制单人单位编码';
COMMENT ON COLUMN T_LIMS_RUN_OUTSEND.CREATEDBYORGNAME IS '制单人单位名称';

ALTER TABLE T_LIMS_RUN_OUTSEND ADD CONSTRAINT PK_LIMS_RUN_OUTSEND PRIMARY KEY (ID);

-- 旧版审计跟踪，跟踪配置变更语句

INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','ID','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','RUNID','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','OUTSOURCERNAME','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','OUTSOURCERID','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','COURIER','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','COURIERNUMBER','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','SENDTIME','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','REMARK','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDBYID','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDBYNAME','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDTIME','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDBYORGID','1',CURRENT_TIMESTAMP);
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDTIME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDBYORGNAME','1',CURRENT_TIMESTAMP);
COMMIT;

-- 审计跟踪V2，跟踪配置变更语句

INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','ID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','RUNID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','OUTSOURCERNAME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','OUTSOURCERID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','COURIER','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','COURIERNUMBER','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','SENDTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','REMARK','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDBYID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDBYNAME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDBYORGID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_RUN_OUTSEND','CREATEDBYORGNAME','1');
COMMIT;
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.SERVICE_NAME', '任务批次-外送信息表', '任务批次-外送信息表', 'zh-CN', '任务批次-外送信息表');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.ID', '任务批次-外送信息表的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.RUNID', '任务批次-外送信息表的批次ID', '批次ID', 'zh-CN', '批次ID');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.OUTSOURCERNAME', '任务批次-外送信息表的外包商名称', '外包商名称', 'zh-CN', '外包商名称');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.OUTSOURCERID', '任务批次-外送信息表的外包商id', '外包商id', 'zh-CN', '外包商id');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.COURIER', '任务批次-外送信息表的快递公司', '快递公司', 'zh-CN', '快递公司');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.COURIERNUMBER', '任务批次-外送信息表的快递单号', '快递单号', 'zh-CN', '快递单号');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.SENDTIME', '任务批次-外送信息表的外送时间', '外送时间', 'zh-CN', '外送时间');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.REMARK', '任务批次-外送信息表的备注', '备注', 'zh-CN', '备注');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.CREATEDBYID', '任务批次-外送信息表的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.CREATEDBYNAME', '任务批次-外送信息表的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.CREATEDTIME', '任务批次-外送信息表的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.CREATEDBYORGID', '任务批次-外送信息表的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_RUN_OUTSEND.CREATEDBYORGNAME', '任务批次-外送信息表的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('BASEMODULE.BUSINESS.RESULT.OUTORDERS.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.BUSINESS.RESULT.OUTORDERS.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.BUSINESS.RESULT.OUTORDERS.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.BUSINESS.RESULT.OUTORDERS.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.BUSINESS.RESULT.OUTORDERS.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');

-- 创建菜单语句
INSERT INTO T_CORE_MENU (ID, MENUNAME, HREF, PARENTID, ORDERNO, ICON, MENUINITNAME)
VALUES ('2023070301', '外包单', '/secure/basemodule/business/result/run-outsends/page/edit-list', 'null', '2023070301', 'null', '外包单');

INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_RUN_OUTSEND', '0', '0');


COMMIT;

-- ----------------------------- 2023-07-03 add by zhoujq------------end